The present invention relates in general to computer-based image generation and in particular to transferring textures from one surface to another based on three-dimensional location information.
Computer-based image generation is frequently used to produce animated movies. The characters and other objects that will appear in the movie can be defined as three-dimensional (“3-D”) models that can be placed at various positions within a scene. Generally, the models for characters (and other movable objects) provide enough information to allow the character to be shown from any angle.
Modeling a character or other object usually involves defining the surface geometry (size and shape) of the character or object. Typically, the geometry is defined using one or more surfaces, where each surface is defined by a control mesh that includes a set of control vertices and rules for interpolating between the control vertices to locate other points on the surface. Each control vertex has coordinates (x, y, z) in a 3-D modeling coordinate space and is mapped to (u, v) coordinates in a “texture space”; rules for establishing such mappings are well known. The texture space is used to apply color (and other attributes) to the surface. As is generally known, a texture map associates an attribute value with (u, v) coordinates of a texel in a texture space. The texture map can be created, e.g., manually or procedurally. Multiple texture maps can be used to represent multiple attributes or in some cases perturbations to be applied to attributes. When the object is rendered, the rendering algorithm uses the texture mapping to determine the (u, v) texture coordinates associated with a point on the object's surface, then uses the texture coordinates to select a corresponding texel from the texture map. Texture coordinates for arbitrary points on an object's surface are usually determined by interpolation between the texture coordinates associated with neighboring control vertices. In some cases, multiple texels may be read and blended, or filtered, rather than using a single texel per point.
During the course of creating an animated movie, the texture and/or the object geometry of various objects appearing in the movie might both be changed. For instance, models of characters in the movie often undergo many changes (e.g., for esthetic effect) as the production progresses. Thus, it might be decided that a character's eyes should be larger or smaller in relation to his face, then later that a surface feature (e.g., a chin cleft) should be added to the face, and later still that the character should be taller or thinner. Dozens of changes can be expected in the course of developing the important characters in an animated movie.
Changing the geometry of a character or other object usually requires changes in the texture map(s) associated with the object. For instance, changes in the geometry usually include changing the control vertices, e.g., by adding new control vertices, deleting old control vertices, and/or shifting control vertices points to new positions. The mapping of control vertices to texture space coordinates is determined by the geometry, and modifying the control vertices may result in changes in the texture mapping. (Sometimes, even a seemingly small modification to the control vertices can result in a large change in the texture mapping.) If the texture information is not properly transferred from the original texture map to a new texture map associated with the modified model, undesirable distortion can result.
Existing techniques for transferring textures from old geometry to new geometry are time-consuming. One such technique entails manually re-painting the texture onto the modified object. This process is tedious and time-consuming. Another technique uses 2-D projections of the rendered object to at least partially automate the texture transfer. In this technique, a 2-D image of the original object is rendered from each of six orthographic projections. These rendered images are then projected, from appropriate directions, onto the modified object. The projections are used to populate a texture map associated with the modified object. This projection technique can save a significant amount of time as compared to manual re-painting, particularly for any portions of the object where geometry was not changed. However, projection techniques have other drawbacks. For instance, for a character with limbs (e.g., arms and legs), portions of the limbs will likely be occluded, or other portions of the body will be occluded by the limbs. Texture information for occluded portions of the object is lost in projection and must be manually re-created. In addition, distortion can result, e.g., if a surface of the object is oriented at an angle to the optical axis of the projection. Consequently, texture transfers can be accelerated using 2-D projections but often end up requiring extensive manual cleanup.
It would therefore be desirable to provide improved techniques for transferring textures between different versions of object geometry.